﻿using System;
using System.Collections.Generic;

namespace Poly2Tri
{
	// Token: 0x02000409 RID: 1033
	public class PointGenerator
	{
		// Token: 0x06001CD4 RID: 7380 RVA: 0x000B361C File Offset: 0x000B181C
		public static List<TriangulationPoint> UniformDistribution(int n, double scale)
		{
			List<TriangulationPoint> list = new List<TriangulationPoint>();
			for (int i = 0; i < n; i++)
			{
				list.Add(new TriangulationPoint(scale * (0.5 - PointGenerator.RNG.NextDouble()), scale * (0.5 - PointGenerator.RNG.NextDouble())));
			}
			return list;
		}

		// Token: 0x06001CD5 RID: 7381 RVA: 0x000B367C File Offset: 0x000B187C
		public static List<TriangulationPoint> UniformGrid(int n, double scale)
		{
			double num = scale / (double)n;
			double num2 = 0.5 * scale;
			List<TriangulationPoint> list = new List<TriangulationPoint>();
			for (int i = 0; i < n + 1; i++)
			{
				double x = num2 - (double)i * num;
				for (int j = 0; j < n + 1; j++)
				{
					list.Add(new TriangulationPoint(x, num2 - (double)j * num));
				}
			}
			return list;
		}

		// Token: 0x04001DAD RID: 7597
		private static readonly Random RNG = new Random();
	}
}
